<template>
    <div>
        <div class="big">
            <div class="da">
                <img :src="item.img" alt="" width="100%" height="200px" @click="push">
                <p>{{ item.ms }}</p>
                <p>
                    <span>${{ item.jg }}</span>
                </p>
                <p>
                    <van-button type="primary" style="color: #fff;">立即购买</van-button>
                </p>
            </div>
        </div>
    </div>
</template>

<script setup>
//接收
import { defineProps } from 'vue'
//引入路由
import {useRoute,useRouter} from 'vue-router'
//实例化
const router=useRouter()
const route=useRoute()
const props = defineProps(["item"])
//点击跳转
const push=()=>{
    router.push({
        path:'/detail',
        query:{
            id:props.item.id,
            img:props.item.img,
            ms:props.item.ms,
        }
    })
}
</script>

<style lang="scss" scoped></style>